/* eslint-disable */
// @ts-ignore
import request from '@/utils/http';

import * as API from './types';

/** 删除 POST /sco/goods/deleteData */
export async function scoGoodsDeleteDataUsingPost({
  body,
  options,
}: {
  body: API.ScoGoodsBoScoGoodsDeleteData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/sco/goods/deleteData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查看商品 POST /sco/goods/getData */
export async function scoGoodsGetDataUsingPost({
  body,
  options,
}: {
  body: API.ScoGoodsBoScoGoodsGetData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RScoGoodsVo>('/sco/goods/getData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页查询 POST /sco/goods/pageData */
export async function scoGoodsPageDataUsingPost({
  body,
  options,
}: {
  body: API.ScoGoodsBoScoGoodsPageData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RPageDataVoScoGoodsVo>('/sco/goods/pageData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 添加商品 POST /sco/goods/saveData */
export async function scoGoodsSaveDataUsingPost({
  body,
  options,
}: {
  body: API.ScoGoodsBoScoGoodsSaveData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RLong>('/sco/goods/saveData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改商品 POST /sco/goods/updateData */
export async function scoGoodsUpdateDataUsingPost({
  body,
  options,
}: {
  body: API.ScoGoodsBo;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/sco/goods/updateData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 入库 POST /sco/goods/updateStock */
export async function scoGoodsUpdateStockUsingPost({
  body,
  options,
}: {
  body: API.ScoGoodsBoScoGoodsUpdateStock;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/sco/goods/updateStock', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
